.TH timidity.cfg 5 "April 25 2004" "2.13.0"
.SH NAME
timidity.cfg \- configure file of TiMidity++
.SH DESCRIPTION
The file \fBtimidity.cfg\fP describes the runtime environments of
timidity(1): that are the path of sound font, instruments
configurations or else.
.br
\fBTiMidity++\fP looks for the configuration file \fBtimidity.cfg\fP
at startup, before processing any options.  If it can't be accessed,
and the library path is changed with a \fB\-L\fP option on the command
line, then the default file will be sought again along the new library
path after processing all options, unless another configuration file
was specified with the \fB\-c\fP option.
.br
Configuration files define the mapping of MIDI programs to instrument
files.  Multiple files may be specified, and statements in later ones
will override earlier ones.
.SH VARIABLE
When alphanumeric and/or underscore `_' characters continue after
dollar sign `$', it is considered that the string is a variable and
the configuration file is processed, it is transposed to another
string.  The variable name can also be written with an inside
parenthesis, in order to separate from a following character.
.sp
For example:
.br
$variable
.br
${variable} # same as $variable
.sp
For the moment, the command which newly defines variables is not
prepared.  The undifined variable is transposed to null string.
.br
The variable defined as a regular variable is the next only one.
.TP
.B $basedir
Expresses the directory where the configuration file exists.  By the
command which mainly specifies a path, it uses in order to specify the
relative path from a setting file.
.br
When a blank may be included in $basedir, it is necessary to bundle
with "".
.sp
For example:
.br
In /usr/local/share/timidity/timidity.cfg
.br
dir $basedir/inst # source /usr/local/share/timidity/inst
.SH SYNTAX
The following statements can be used in a configuration file:
.TP
.BI "dir " "directory [...]"
Adds \fIdirectory\fP to the search path in the same manner as the
\fB\-L\fP command line option.
.br
Archive file are also allowed.
.sp
For example:
.br
dir /usr/local/share/timidity/inst/foo.zip#
.br
bank 0
.br
0 bar.pat
.br
1 baz.pat
.br
2 zoo.pat
.sp
At first, \fBdir\fP specifies the archive name (followed by `#') for
the path of patch files same as directory name (in this case,
/usr/local/share/timidity/inst/foo.zip).  \fBTiMidity++\fP recognize
the path is an archive file if the expression has the last character
`#', and also read the files contained in this archive file.  In
previous example the patch files bar.pat, baz.pat and zoo.pat
contained in the foo.zip are also installed.
.TP
.BI "source " "file [...]"
Reads another configuration file, then continues processing the
current one.
.TP
.BI "progbase " number
Sets and displays the tone number from \fInumber\fP to
\fInumber\fP+128.  If \fBprogbase 1\fP are specified, tone numbers
that follow are set and displayed as the numbers from \fB1\fP to
\fB128\fP.
.TP
.BI "bank " "[MapID1] number"
Selects the tone bank to modify.  Patch mappings that follow will
affect this tone bank.  You can indicate specific map as a target, by
specifing any ofthe following to \fIMapID1\fP: \fBgm2\fP, \fBsc55\fP,
\fBsc88\fP, \fBsc88pro\fP, \fBsc8850\fP, \fBxg\fP and \fBxgsfx64\fP.
.TP
.BI "drumset " "[MapID2] number"
Selects the drum set to modify.  Patch mappings that follow will
affect this drum set.  You can indicate specific map as a target, by
specifing any ofthe following to \fIMapID2\fP: \fBgm2drum\fP,
\fBsc55drum\fP, \fBsc88drum\fP, \fBsc88prodrum\fP, \fBsc8850drum\fP,
\fBxgdrum\fP and \fBxgsfx126\fP.
.TP
.BI "number " "file [options]"
.br
.ns
.TP
.BI "number %font " "file bank prog [key] [options]"
.br
.ns
.TP
.BI "number %sample " "file [options]"
Specifies that the MIDI program number in the current tone bank or
drum set should be played using the patch file.  If \fIfile\fP is
SoundFont, the specific instrument with \fIbank\fP, \fIprog\fP, and
\fIkey\fP is taken out by the format of \fBnumber %font\fP.  If
\fIfile\fP is linear AIFF or WAV sample data, the MIDI program number
is specified by the format of \fBnumber %sample\fP.  Options may be
any of the following:
.RS
.TP
.BI amp= amplification
Amplifies the instrument's volume by \fIamplification\fP percent.  If
no value is specified, one will be automatically determined whenever
the instrument is loaded.
.TP
.BI note= note
Specifies a fixed MIDI note to use when playing the instrument.  If
\fInote\fP is \fB0\fP, the instrument will be played at whatever note
the Note On event triggering it has.  For percussion instruments, if
no value is specified in the configuration file, the default in the
patch file will be used.
.TP
.BI pan= panning
Sets the instrument's default panning.  \fIpanning\fP may be
\fBleft\fP, \fBright\fP, \fBcenter\fP, or an integer between
\fB\-100\fP and \fB100\fP, designating full left and full right
respectively.  If no value is specified, the default in the patch file
will be used.  Note that panning controls in MIDI files will override
this value.
.TP
.BI tune= tuning[,...]
Adjust the instrument's root frequency.  \fBtune=1\fP causes \fB1\fP
half tone higher.  Since a fraction is available for \fItuning\fP, it
is possible to do fine tuning such as \fBtune=\-0.2\fP.  When two or
more sample data is contained, the arguments after the second can
specify different value respectively.
.TP
.BI rate= attack:decay:sustain:release1:release2:release3[,...]
Sets the instrument's ADSR rate.  Each value may be an integer between
\fB0\fP and \fB255\fP.  When you set only sustain rate,
.sp
6 GUS/hrpschrd.pat rate=::60
.sp
is available.  When you set only attack time fasten,
.sp
6 GUS/hrpschrd.pat rate=255
.sp
is available.  When two or more sample data is contained, the
arguments after the second can specify different value respectively.
.TP
.BI offset= attack:decay:sustain:release1:release2:release3[,...]
Sets the instrument's ADSR offset.  Each value may be an integer
between \fB0\fP and \fB255\fP.  The format is same as \fBrate=\fP.
.TP
.B keep={loop|env}
By default, percussion instruments have their loop and envelope
information stripped.  Strangely shaped envelopes are removed
automatically from melodic instruments as well.  \fBkeep=\fP can be
used to prevent stripping loop or envelope data.  For example, the
Short and Long Whistle percussion instruments (General Midi numbers 71
and 72) need to have `\fBkeep=loop keep=env\fP' specified in the
configuration file.
.TP
.B strip={loop|env|tail}
Force removal of loop or envelope information from all patches in the
instrument, or strip the tail, i.e. all data after the loop.  Some
third\-party instruments have garbage after the loop, as evidenced by
a clicking noise whenever the instrument is played, so adding the
\fBstrip=tail\fP option will markedly improve sound quality.
.TP
.BI tremolo= sweep_increment:control_ratio:depth[,...]
Sets the instrument's tremolo.  Each value may be an integer
between \fB0\fP and \fB255\fP.  The format is similar to \fBrate=\fP.
\fIsweep_increment\fP is the time until tremolo is started.
\fIcontrol_ratio\fP is the rate changing amplification.
\fIdepth\fP is the depth changing amplification.
.TP
.BI vibrato= sweep_increment:phase_increment:depth[,...]
Sets the instrument's vibrato.  Each value may be an integer
between \fB0\fP and \fB255\fP.  The format is similar to \fBrate=\fP.
\fIsweep_increment\fP is the time until vibrato is started.
\fIphase_increment\fP is the rate changing frequency.
\fIdepth\fP is the depth changing frequency.
.TP
.BI sclnote= note[,...]
Sets the instrument's standard note for scale tuning.  For example,
\fBsclnote=60\fP causes the center note C to be standard note for
scale tuning.  When two or more sample data is contained, the
arguments after the second can specify different value respectively.
.TP
.BI scltune= tune[,...]
Sets the instrument's scale tuning factor in cents.  For example,
\fBscltune=50\fP causes the half tone steps as \fB50\fP cents.  When
two or more sample data is contained, the arguments after the second
can specify different value respectively.
.TP
.BI comm= comment
Specifies the comment \fIcomment\fP.
.TP
.BI modrate= attack:decay:sustain:release1:release2:release3[,...]
.br
.ns
.TP
.BI modoffset= attack:decay:sustain:release1:release2:release3[,...]
Sets the instrument's behavior of change of modulation envelope.
The format and values are fundamentally same as volume envelope.
Except for some SoundFonts, even if it specifies only the option,
nothing happens.
.TP
.BI envkeyf= attack:decay:sustain:release1:release2:release3[,...]
Sets the instrument's volume envelope key follow.  Based on
\fBnote=60\fP, it changes envelope time according to note.  The unit
is +\-cent/key.  For example, \fBenvkeyf=100\fP means that the attack
time will double when it goes up by 1 octave.  The format is similar
to \fBrate=\fP.  The parameter of \fIdecay\fP and \fIsustain\fP may be
preset in some SoundFont.
.TP
.BI envvelf= attack:decay:sustain:release1:release2:release3[,...]
Sets the instrument's volume envelope velocity follow.  Based on
\fBvelocity=64\fP, it changes envelope time according to velocity.
The unit is +\-cent/velocity.  For example, \fBenvvelf=100\fP means
that the attack time will 38 times at \fBvelocity=127\fP.  The format
is similar to \fBrate=\fP.  In the future, the specification of this
option may be changed.
.TP
.BI modkeyf= attack:decay:sustain:release1:release2:release3[,...]
Sets the instrument's modulation envelope key follow.  Based on
\fBnote=60\fP, it changes envelope time according to note.  The unit
is +\-cent/key.  For example, \fBmodkeyf=100\fP means that the attack
time will double when it goes up by 1 octave.  The format is similar
to \fBrate=\fP.  The parameter of \fIdecay\fP and \fIsustain\fP may be
preset in some SoundFont.
.TP
.BI modvelf= attack:decay:sustain:release1:release2:release3[,...]
Sets the instrument's modulation envelope velocity follow.  Based on
\fBvelocity=64\fP, it changes envelope time according to velocity.
The unit is +\-cent/velocity.  For example, \fBmodvelf=100\fP means
that the attack time will 38 times at \fBvelocity=127\fP.  The format
is similar to \fBrate=\fP.  In the future, the specification of this
option may be changed.
.TP
.BI trempitch= num[,...]
Sets the instrument's depth of changing pitch according to tremolo.
The effect itself is same as vibrato, it uses to operate in another
system.  The unit is +\-cent.  The format is similar to \fBrate=\fP.
.TP
.BI tremfc= num[,...]
Sets the instrument's depth of changing cutoff frequency according to
tremolo.  It can express the so\-called glowl effect.  The unit, etc.
are same as \fBtrempitch=\fP.
.TP
.BI modpitch= num[,...]
Sets the instrument's depth of changing pitch according to modulation
envelope.  It can temporarily express raising pitch only for the
attack stage.  The unit, etc. are same as \fBtrempitch=\fP.
.TP
.BI modfc= num[,...]
Sets the instrument's depth of changing cutoff frequency according to
modulation envelope.  The unit, etc. are same as \fBtrempitch=\fP.
.TP
.BI fc= num[,...]
Sets the instrument's standard of cutoff frequency.  The unit is Hz.
The format is similar to \fBrate=\fP.
.TP
.BI q= num[,...]
Sets the instrument's Q (resonance).  The unit is cB.  The format is
similar to \fBrate=\fP.
.TP
.BI fckeyf= num
Sets the instrument's filter key follow.  Based on \fBnote=60\fP, it
change cutoff frequency according to note.  The unit is +\-cent/key.
For example, \fBfckeyf=100\fP means that it changes same as pitch.
.TP
.BI fcvelf= num
Sets the instrument's filter velocity follow.  Based on
\fBvelocity=127\fP, it changes cutoff frequency according to velocity.
The unit is +\-cent.  In SoundFont, \fB\-2400\fP is set up as a
characteristic value.
.TP
.BI qvelf= num
Sets the instrument's resonance velocity follow.  Based on
\fBvelocity=0\fP, it changes resonance according to velocity.  The
unit is +\-cB.
.RE
.TP
.BI "default " file
When MIDI program appears, which is not mapped to instrument file,
this file is pronounced as a substitute.
.TP
.BI "map " "MapID1 from\-bank from\-prog to\-bank to\-prog"
The existing tone is assigned as a tone of GS/XG each map.  \fBgm2\fP,
\fBsc55\fP, \fBsc88\fP, \fBsc88pro\fP, \fBsc8850, \fP\fBxg\fP and
\fBxgsfx64\fP can be specified to be \fIMapID1\fP.
.TP
.BI "map " "MapID2 from\-drumset from\-keynote to\-drumset to\-keynote"
The existing drum is assigned as a drum of GS/XG each map.
\fBgm2drum\fP, \fBsc55drum\fP, \fBsc88drum\fP, \fBsc88prodrum\fP,
\fBsc8850drum\fP, \fBxgdrum\fP and \fBxgsfx126\fP can be specified to
be \fIMapID2\fP.
.TP
.BI "soundfont " "file [options]"
Read the whole SoundFont.  \fIoptions\fP may be any of the following:
.RS
.TP
.BI order= number
Sets the order of searching for instrument.  When \fBorder=0\fP, first
read SoundFont, and then search for insufficient samples in GUS/patch.
When \fBorder=1\fP, after reading GUS/patch, search for SoundFont.
.TP
.BI amp= amplification
Sets the amplification of the whole SoundFont as \fIamplification\fP%.
If the value is not specified, it is set by \fB100\fP%.
.TP
.BI cutoff= number
Specifies whether LPF in SoundFont is enable (\fB1\fP) or disable
(\fB0\fP).  If the value is not specified, it is considered to be
enable.
.TP
.BI reso= number
Specifies whether resonance in SoundFont is enable (\fB1\fP) or disable
(\fB0\fP).  If the value is not specified, it is considered to be
enable.
.TP
.B remove
Cancels the target SoundFont from the memory.
.RE
.TP
.BI "font exclude " "bank [prog [key]]"
Suppresses searching for SoundFont of \fIbank\fP, \fIprog\fP.
If the sample is drumset, bank is \fB128\fP, drumset is \fIprog\fP,
keynum is \fIkey\fP.
.TP
.BI "font order " "number bank [prog [key]]"
Sets the order of searching for instrument individually.  The format is
same as \fBfont exclude\fP.
.LP
The following statements are available only latest \fBTiMidity++\fP.
.TP
.BI "#extension altassign " "program1 program2 ..."
Sets the alternate assign for drum set.  For example, if you want to
pronounce Hi\-Hat cymbals (note number \fB42\fP, \fB44\fP and
\fB46\fP) in the \fBdrumset 0\fP exclusively to each others, specify:
.sp
drumset 0
.br
altassign 42 44 46
.sp
Note that alternate assign of \fBdrumset 0\fP is used by default.
.TP
.BI "#extension comm " "program comment"
Specifies the comment \fIcomment\fP for the tone number \fIprogram\fP.
These comments are displayed in the indicator line when
\fBTiMidity++\fP is booted with option \fB\-int\fP, \fB\-iTt\fP.
.TP
.BI "#extension timeout " "program second"
Specifies the time\-out value of the \fIprogram\fP.  If any notes
played with the tone number \fIprogram\fP are suspended more than
\fIsecond\fP seconds, \fBTiMidity++\fP kills the notes.
.TP
.BI "#extension copydrumset " drumset
Copies all settings of the \fIdrumset\fP to the current drumset.
.TP
.BI "#extension copybank " bank
Copies all settings of the \fIbank\fP to the current bank.
.TP
.BI "#extension copymap " "to\-MapID from\-MapID"
Copies all settings of the banks defined for the map \fIfrom\-MapID\fP
to the map \fIto\-MapID\fP.
.TP
.BI "#extension HTTPproxy " hostname:port
Specifies the proxy of the HTTP protocol.  \fIhostname\fP and
\fIport\fB are of the proxy host's.
.TP
.BI "#extension FTPproxy " hostname:port
Specifies the proxy of the FTP protocol.  Same as HTTP.
.TP
.BI "#extension mailaddr " your\-mail\-address
Specifies user's mail address.  This address is sent to the FTP
server if \fBTiMidity++\fP access any file via FTP.
.TP
.BI "#extension opt " option
Sets the value of boot\-time options.
.TP
.BI "#extension undef " progno
Undefines the tone \fIprogno\fP of current tone bank.
.TP
.BI "#extension legato " "progno " {0|1}
Specifies whether legato is enable (\fB1\fP) or disable (\fB0\fP) on
\fIprogno\fP.
.TP
.BI "#extension level " "progno tva_level"
Sets the standard value of changing amplification when processing Drum
Instrument TVA Level of NRPN.  Unless Drum Instrument TVA Level is
specified at playing, the amplification is not influenced.
\fIprogno\fP can carry out package specification by `,' and/or
[\fIstart\fP]\-[\fIend\fP].  If start and end are omitted, they are
assumed to be \fB0\fP and \fB127\fP respectively.
.TP
.BI "#extension damper " "progno " {0|1}
Specifies whether redamper and half-damper are enable (\fB1\fP) or
disable (\fB0\fP) on \fIprogno\fP.
.TP
.BI "#extension playnote " "progno note"
Sets the frequency of pronounce to \fBnote\fP.  If the frequency of
pronounce is specified by GS SysEx Play Note, the pitch is changed
appropriately according to the value.  \fIprogno\fP can carry out
package specification by `,' and/or [\fIstart\fP]\-[\fIend\fP].  If
start and end are omitted, they are assumed to be \fB0\fP and
\fB127\fP respectively.
.sp
For example:
.br
drumset 0
.br
#extension playnote \-37,39,44\-46,55\-60
.TP
.BI "#extension delaysend " "progno level"
.br
.ns
.TP
.BI "#extension chorussend " "progno level"
.br
.ns
.TP
.BI "#extension reverbsend " "progno level"
Sets the send level when drum part effect is enable.  All initial value
are \fB127\fP.  If one of delay, chorus and reverb is at least set up,
the effect which is not set as the tone will become the initial value
\fB0\fP.  \fIprogno\fP can carry out package specification by `,'
and/or [\fIstart\fP]\-[\fIend\fP].  If start and end are omitted, they
are assumed to be \fB0\fP and \fB127\fP respectively.
.TP
.BI "#extension rnddelay " "progno msec"
For every pronunciation, it is random and less than a maximum of
\fImsec\fP delay.  The distribution of random value is pink noise
(1/f fluctuation) rather than a white noise.
.LP
These \fB#extension\fP statements are beginning with character `#'
that is the comment flag of old TiMidity (version 0.2i or earlier).
So these statements are treated as comment line.
.br
The latest \fBTiMidity++\fP treats \fB#extension\fP as white\-space.
So you can omit it.
.LP
If any file\-name expression ended with character `|' (Ascii 0x7c),
the file\-name is treated as command and outputs of the command
are also examined as arguments of statements.
.br
\fBsource\fP \fIcommand\fP| causes the output of \fIcommand\fP becomes
the argument of \fBsource\fP.  It is convenient to choose settings of
\fBTiMidity++\fP according to environment.  In addition, if a space
enters on the way like \fIcommand\fP |, it will be divided at the time
of setting file reading, and will no longer be regarded as a command.
This function is applicable to all the places that can specify a file
name.
.sp
.RS
timidity 'cat fild.mid|'
.RE
.sp
will read from the output of cat fild.mid.
.SH FILES
.TP
.B /etc/timidity.cfg
.TP
.B /usr/local/share/timidity/timidity.cfg
.SH SEE ALSO
timidity(1), lsmidiprog(1), mididump(1), patinfo(1), sf2text(1), wav2pat(1)
.SH COPYRIGHT
Copyright (C) 1999\-2004 Masanao Izumo <iz@onicos.co.jp>
.br
Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>
.LP
The original version was developed by Tuukka Toivonen <tt@cgs.fi>
until the release of TiMidity\-0.2i.  His development was discontinued
because of his being busy with work.
.LP
This program is free software; you can redistribute it and/or modify
it under the terms of the \fIGNU General Public License\fP as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
.LP
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the \fIGNU
General Public License\fP for more details.
.LP
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111\-1307
USA
.SH AVAILABILITY
The latest release is available on the \fBTiMidity++\fP Page,
.LP
URL http://www.timidity.jp/
